package com.web.exiaodao.business.repository;

import com.web.exiaodao.business.entity.Order;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;


public interface OrderRepository extends
		PagingAndSortingRepository<Order, Long>,
		JpaSpecificationExecutor<Order> {
	//根据自增id查询
	public Order findByIdAndStatusNot(Long id, Integer status);
	//根据订单号id查询
	public Order findByOrderNo(String orderNo);
	public Order findByOrderNoAndStatusNot(String orderNo, Integer status);
	/**
	 * 根据订单编号查找订单(微信退款使用)
	 * @param refuOrderNo
	 * @param status
	 * @return
	 */
	public Order findByRefuOrderNoAndStatusNot(String refuOrderNo,Integer status);
	/**
	 * 根据银联流水号或支付宝交易号查找订单(退款使用)
	 * @param queryId
	 * @param status
	 * @return
	 */
	public Order findByQueryIdAndStatusNot(String queryId,Integer status);
}
